/*
 * Copyright (c) 2025 CAX Conversion Project
 */
package com.comac.ins.bomt.service;

import com.comac.ins.bomt.common.enums.BizStepEnum;
import com.comac.ins.bomt.domain.vo.KeywordVo;
import com.comac.ins.bomt.domain.vo.BomtTreeNodeVo;
import com.comac.ins.common.core.domain.model.LoginUser;
import com.comac.ins.common.mybatis.core.page.PageQuery;
import com.comac.ins.common.mybatis.core.page.TableDataInfo;

import java.util.List;
import java.util.Set;

/**
 * 关键词列表服务
 *
 * @author zhanghongyi
 * @date 2024 /8/6 10:47
 * @description KeywordListService
 */
public interface KeywordListService {

    /**
     * 创建关键词列表
     *
     * @param loginUser     the login user
     * @param listCode      the list code
     * @param listName      the list name
     * @param bindStep      the bind step
     * @param aircraftModel the aircraft model
     * @param keywordList   the keyword list
     */
    void create(LoginUser loginUser, String listCode, String listName, BizStepEnum bindStep, String aircraftModel, List<String> keywordList);

    /**
     * 删除关键词列表
     *
     * @param loginUser     the login user
     * @param listCode      the list code
     * @param aircraftModel the aircraft model
     */
    void drop(LoginUser loginUser, String listCode, String aircraftModel);

    /**
     * 删除关键词列表内的关键词
     *
     * @param loginUser     the login user
     * @param listCode      the list code
     * @param aircraftModel the aircraft model
     * @param keywords      the keywords
     */
    void delete(LoginUser loginUser, String listCode, String aircraftModel, Set<String> keywords);

    /**
     * 在关键词列表新增关键词
     *
     * @param loginUser     the login user
     * @param listCode      the list code
     * @param aircraftModel the aircraft model
     * @param keywords      the keywords
     */
    void add(LoginUser loginUser, String listCode, String aircraftModel, Set<String> keywords);

    /**
     * 分页查询关键词列表内的关键词
     *
     * @param loginUser     the login user
     * @param listCode      关键词列表编码
     * @param aircraftModel 机型
     * @param keyword       关键词
     * @param pageQuery     分页请求
     * @return the table data info
     */
    TableDataInfo<KeywordVo> queryByPage(LoginUser loginUser, String listCode, String aircraftModel, String keyword, PageQuery pageQuery);

    /**
     * 查询绑定机型和类型的关键词列表.
     *
     * @param loginUser     the login user
     * @param bizStep       the biz step
     * @param aircraftModel the aircraft model
     * @return the list
     */
    List<String> queryByBindType(LoginUser loginUser, BizStepEnum bizStep, String aircraftModel);

    /**
     * 查询所有的关键词列表树.
     *
     * @param loginUser the login user
     * @return the list
     */
    List<BomtTreeNodeVo> queryAll(LoginUser loginUser);

}
